/***************************************************************
*  Copyright (c) 2007 by GroupMe! Team (www.groupme.net)
*  All rights reserved.
*
*  This file is part of the GroupMe! Project. Source code of 
*  this project is closed and redistribution of this code is
*  prohibited. 
*  
*  Contact: http://www.groupme.net
*
*  This copyright notice MUST APPEAR in all copies of the file!
***************************************************************/
package net.groupme.model.rdf;

import net.groupme.model.Identifiable;
import net.groupme.model.Resource;

/**
 * created on Jun 27, 2007
 * 
 * This interface defines the GroupMe! internal model of an RDF Statement. A GroupMe! Statement 
 * has always a {@link Resource} as subject.
 * 
 * <b>Caution:</b> In such cases that the object of a Statement is a RDF resource again with
 * additional properties we simply store RDF within the object. Example:
 * 
 * <pre>
 * (http://groupme.org/resource#A,
 *  http://xmlns.com/foaf/0.1/topic,
 *     (http://abc.de/TopicX,
 *      http://www.w3.org/2000/01/rdf-schema#description,
 *      "This topic describes...")
 *  )
 * </pre>
 * 
 * In such a case the datatype will be DATATYPE_RDF and the object String will be formated
 * as RDF/XML.
 * 
 * @author Fabian Abel, <a href="mailto:abel@l3s.de">abel@l3s.de</a>
 * @author last edited by: $Author: mischa $
 * 
 * @version $Revision: 1.2 $ $Date: 2007-06-28 13:24:34 $
 */
public interface Statement extends Identifiable {
	
	/** indicates that the object of a Statement is RDF/XML-formatted RDF. */
	public static final String DATATYPE_RDF = "rdf";

	/**
	 * This method returns the subject of a Statement object. The subject is always a {@link Resource} instance.
	 * @return the subject of the Statement 
	 */
	public Resource getSubject();
	
	/**
	 * This method sets the {@link Resource} instance of a Statement object.
	 * 
	 * @param resource the {@link Resource} object which is the subject of this Statement
	 * @return returns <code>true</code> if the resource was set successfully, otherwise <code>false</code>
	 */
	public boolean setSubject(Resource resource);

	/**
	 * This method returns the property of a Statement.
	 * @return the property (full URI)
	 */
	public String getProperty();
	
	/**
	 * This method sets the property of a StatementImpl object.
	 *
	 * @param property the property (full URI) of the Statement
	 * @return returns <code>true</code> if the property was set successfully, otherwise <code>false</code>
	 */
	public boolean setProperty(String property);
	
	/**
	 * This method returns the object of a Statement.
	 * @return the object of the Statement
	 */
	public String getObject();
	
	/**
	 * This method sets the object of a Statement.
	 * 
	 * @param object the object of the Statement
	 * @return returns <code>true</code> if the object was set successfully, otherwise <code>false</code>
	 */
	public boolean setObject(String object);
	
	
	/**
	 * This method returns the datatype of the Statement's object.
	 * @return the datatype (should be a full XSD-URI)
	 */
	public String getDatatype();
	
	/**
	 * This method sets the datatype of the Statement's object.
	 * 
	 * @param datatype the datatype (should be a full XSD-URI)
	 * @return returns <code>true</code> if the datatype was set successfully, otherwise <code>false</code>
	 */
	public boolean setDatatype(String datatype);
}
